package com.ruoyi.front.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.front.mapper.SCopyrightMapper;
import com.ruoyi.front.domain.SCopyright;
import com.ruoyi.front.service.ISCopyrightService;
import com.ruoyi.common.core.text.Convert;

/**
 * copyrightService业务层处理
 * 
 * @author jyp
 * @date 2021-07-28
 */
@Service
public class SCopyrightServiceImpl implements ISCopyrightService 
{
    @Autowired
    private SCopyrightMapper sCopyrightMapper;

    /**
     * 查询copyright
     * 
     * @param id copyrightID
     * @return copyright
     */
    @Override
    public SCopyright selectSCopyrightById(String id)
    {
        return sCopyrightMapper.selectSCopyrightById(id);
    }

    /**
     * 查询copyright列表
     * 
     * @param sCopyright copyright
     * @return copyright
     */
    @Override
    public List<SCopyright> selectSCopyrightList(SCopyright sCopyright)
    {
        return sCopyrightMapper.selectSCopyrightList(sCopyright);
    }

    /**
     * 新增copyright
     * 
     * @param sCopyright copyright
     * @return 结果
     */
    @Override
    public int insertSCopyright(SCopyright sCopyright)
    {
        sCopyright.setCreateTime(DateUtils.getNowDate());
        return sCopyrightMapper.insertSCopyright(sCopyright);
    }

    /**
     * 修改copyright
     * 
     * @param sCopyright copyright
     * @return 结果
     */
    @Override
    public int updateSCopyright(SCopyright sCopyright)
    {
        return sCopyrightMapper.updateSCopyright(sCopyright);
    }

    /**
     * 删除copyright对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSCopyrightByIds(String ids)
    {
        return sCopyrightMapper.deleteSCopyrightByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除copyright信息
     * 
     * @param id copyrightID
     * @return 结果
     */
    @Override
    public int deleteSCopyrightById(String id)
    {
        return sCopyrightMapper.deleteSCopyrightById(id);
    }
}
